TEMPLATE = lib
TARGET = %{ProjectName}
SYSTEMPATH = %{syspath}
DESTDIR = $$SYSTEMPATH/Win32/plugins
QT += core sql gui widgets qml quick

CONFIG(debug, debug|release) {
    TARGETCONFIG = debug
} else {
    TARGETCONFIG = debug
}
win32 {
    TARGETOS = win32
}

unix {

    TARGETOS = unix

}
DEFINES += QT_DLL QT_WIDGETS_LIB QT_SQL_LIB QT_QUICK_LIB QT_QML_LIB
INCLUDEPATH += ./GeneratedFiles \
                . \
                $$SYSTEMPATH/src/shared \
                $$SYSTEMPATH/src/libs \
                $$SYSTEMPATH/src/plugins
LIBS += -L"$$SYSTEMPATH/$$TARGETOS/$$TARGETCONFIG" -lutils -lExtensionSystem -lAggregation -lGraphicsUI -lCustomUI
DEPENDPATH += .
MOC_DIR += ./GeneratedFiles/
OBJECTS_DIR += ./GeneratedFiles/
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFiles
HEADERS += ../../shared/CommonAfx.h \
    %{HFileName}
SOURCES += \
    %{CppFileName}

DISTFILES += \
    $${TARGET}.pluginspec
win32 {
    src_dir = $$PWD/$${TARGET}.pluginspec
    dst_dir =  $$DESTDIR/
    # dst_dir 最后的 \\ 是必须的，用来标示 xcopy 到一个文件夹，若不存在，创建之

    # Replace slashes in paths with backslashes for Windows
    src_dir ~= s,/,\\,g
    dst_dir ~= s,/,\\,g


    QMAKE_POST_LINK = xcopy /e /y $$src_dir $$dst_dir
}
